/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.caresms.service.persistence;

import com.caresms.model.Sms_Master;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import java.util.List;

/**
 * The persistence utility for the sms_ master service. This utility wraps {@link Sms_MasterPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author cc
 * @see Sms_MasterPersistence
 * @see Sms_MasterPersistenceImpl
 * @generated
 */
public class Sms_MasterUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(Sms_Master sms_Master) {
		getPersistence().clearCache(sms_Master);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<Sms_Master> findWithDynamicQuery(
		DynamicQuery dynamicQuery) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<Sms_Master> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<Sms_Master> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static Sms_Master update(Sms_Master sms_Master, boolean merge)
		throws SystemException {
		return getPersistence().update(sms_Master, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static Sms_Master update(Sms_Master sms_Master, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(sms_Master, merge, serviceContext);
	}

	/**
	* Caches the sms_ master in the entity cache if it is enabled.
	*
	* @param sms_Master the sms_ master
	*/
	public static void cacheResult(com.caresms.model.Sms_Master sms_Master) {
		getPersistence().cacheResult(sms_Master);
	}

	/**
	* Caches the sms_ masters in the entity cache if it is enabled.
	*
	* @param sms_Masters the sms_ masters
	*/
	public static void cacheResult(
		java.util.List<com.caresms.model.Sms_Master> sms_Masters) {
		getPersistence().cacheResult(sms_Masters);
	}

	/**
	* Creates a new sms_ master with the primary key. Does not add the sms_ master to the database.
	*
	* @param SmsId the primary key for the new sms_ master
	* @return the new sms_ master
	*/
	public static com.caresms.model.Sms_Master create(long SmsId) {
		return getPersistence().create(SmsId);
	}

	/**
	* Removes the sms_ master with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param SmsId the primary key of the sms_ master
	* @return the sms_ master that was removed
	* @throws com.caresms.NoSuchSms_MasterException if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master remove(long SmsId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().remove(SmsId);
	}

	public static com.caresms.model.Sms_Master updateImpl(
		com.caresms.model.Sms_Master sms_Master, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(sms_Master, merge);
	}

	/**
	* Returns the sms_ master with the primary key or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param SmsId the primary key of the sms_ master
	* @return the sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByPrimaryKey(long SmsId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPrimaryKey(SmsId);
	}

	/**
	* Returns the sms_ master with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param SmsId the primary key of the sms_ master
	* @return the sms_ master, or <code>null</code> if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByPrimaryKey(long SmsId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(SmsId);
	}

	/**
	* Returns the sms_ master where Sms_chars_Size = &#63; and userId = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByFindSmsBycharsSize_User_Id(Sms_chars_Size, userId);
	}

	/**
	* Returns the sms_ master where Sms_chars_Size = &#63; and userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByFindSmsBycharsSize_User_Id(Sms_chars_Size, userId);
	}

	/**
	* Returns the sms_ master where Sms_chars_Size = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByFindSmsBycharsSize_User_Id(Sms_chars_Size, userId,
			retrieveFromCache);
	}

	/**
	* Returns the sms_ master where userId = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param userId the user ID
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByFindSmsByUser_Id(
		long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByFindSmsByUser_Id(userId);
	}

	/**
	* Returns the sms_ master where userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param userId the user ID
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsByUser_Id(
		long userId) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByFindSmsByUser_Id(userId);
	}

	/**
	* Returns the sms_ master where userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param userId the user ID
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsByUser_Id(
		long userId, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByFindSmsByUser_Id(userId, retrieveFromCache);
	}

	/**
	* Returns the sms_ master where isActive = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param isActive the is active
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByFindSmsByIsActive(
		boolean isActive)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByFindSmsByIsActive(isActive);
	}

	/**
	* Returns the sms_ master where isActive = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param isActive the is active
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsByIsActive(
		boolean isActive)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByFindSmsByIsActive(isActive);
	}

	/**
	* Returns the sms_ master where isActive = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param isActive the is active
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsByIsActive(
		boolean isActive, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByFindSmsByIsActive(isActive, retrieveFromCache);
	}

	/**
	* Returns the sms_ master where Approved_By = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param Approved_By the approved_ by
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByFindSmsByApproved_By(
		long Approved_By)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByFindSmsByApproved_By(Approved_By);
	}

	/**
	* Returns the sms_ master where Approved_By = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param Approved_By the approved_ by
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsByApproved_By(
		long Approved_By)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByFindSmsByApproved_By(Approved_By);
	}

	/**
	* Returns the sms_ master where Approved_By = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param Approved_By the approved_ by
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByFindSmsByApproved_By(
		long Approved_By, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByFindSmsByApproved_By(Approved_By, retrieveFromCache);
	}

	/**
	* Returns all the sms_ masters where field2 = &#63;.
	*
	* @param field2 the field2
	* @return the matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.caresms.model.Sms_Master> findByField2(
		boolean field2)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByField2(field2);
	}

	/**
	* Returns a range of all the sms_ masters where field2 = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param field2 the field2
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @return the range of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.caresms.model.Sms_Master> findByField2(
		boolean field2, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByField2(field2, start, end);
	}

	/**
	* Returns an ordered range of all the sms_ masters where field2 = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param field2 the field2
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.caresms.model.Sms_Master> findByField2(
		boolean field2, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByField2(field2, start, end, orderByComparator);
	}

	/**
	* Returns the first sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByField2_First(
		boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByField2_First(field2, orderByComparator);
	}

	/**
	* Returns the first sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByField2_First(
		boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByField2_First(field2, orderByComparator);
	}

	/**
	* Returns the last sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master findByField2_Last(
		boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByField2_Last(field2, orderByComparator);
	}

	/**
	* Returns the last sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master fetchByField2_Last(
		boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByField2_Last(field2, orderByComparator);
	}

	/**
	* Returns the sms_ masters before and after the current sms_ master in the ordered set where field2 = &#63;.
	*
	* @param SmsId the primary key of the current sms_ master
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master[] findByField2_PrevAndNext(
		long SmsId, boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByField2_PrevAndNext(SmsId, field2, orderByComparator);
	}

	/**
	* Returns all the sms_ masters.
	*
	* @return the sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.caresms.model.Sms_Master> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the sms_ masters.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @return the range of sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.caresms.model.Sms_Master> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the sms_ masters.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.caresms.model.Sms_Master> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes the sms_ master where Sms_chars_Size = &#63; and userId = &#63; from the database.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master removeByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .removeByFindSmsBycharsSize_User_Id(Sms_chars_Size, userId);
	}

	/**
	* Removes the sms_ master where userId = &#63; from the database.
	*
	* @param userId the user ID
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master removeByFindSmsByUser_Id(
		long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().removeByFindSmsByUser_Id(userId);
	}

	/**
	* Removes the sms_ master where isActive = &#63; from the database.
	*
	* @param isActive the is active
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master removeByFindSmsByIsActive(
		boolean isActive)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().removeByFindSmsByIsActive(isActive);
	}

	/**
	* Removes the sms_ master where Approved_By = &#63; from the database.
	*
	* @param Approved_By the approved_ by
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public static com.caresms.model.Sms_Master removeByFindSmsByApproved_By(
		long Approved_By)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().removeByFindSmsByApproved_By(Approved_By);
	}

	/**
	* Removes all the sms_ masters where field2 = &#63; from the database.
	*
	* @param field2 the field2
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByField2(boolean field2)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByField2(field2);
	}

	/**
	* Removes all the sms_ masters from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of sms_ masters where Sms_chars_Size = &#63; and userId = &#63;.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static int countByFindSmsBycharsSize_User_Id(int Sms_chars_Size,
		long userId) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .countByFindSmsBycharsSize_User_Id(Sms_chars_Size, userId);
	}

	/**
	* Returns the number of sms_ masters where userId = &#63;.
	*
	* @param userId the user ID
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static int countByFindSmsByUser_Id(long userId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByFindSmsByUser_Id(userId);
	}

	/**
	* Returns the number of sms_ masters where isActive = &#63;.
	*
	* @param isActive the is active
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static int countByFindSmsByIsActive(boolean isActive)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByFindSmsByIsActive(isActive);
	}

	/**
	* Returns the number of sms_ masters where Approved_By = &#63;.
	*
	* @param Approved_By the approved_ by
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static int countByFindSmsByApproved_By(long Approved_By)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByFindSmsByApproved_By(Approved_By);
	}

	/**
	* Returns the number of sms_ masters where field2 = &#63;.
	*
	* @param field2 the field2
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static int countByField2(boolean field2)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByField2(field2);
	}

	/**
	* Returns the number of sms_ masters.
	*
	* @return the number of sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static Sms_MasterPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (Sms_MasterPersistence)PortletBeanLocatorUtil.locate(com.caresms.service.ClpSerializer.getServletContextName(),
					Sms_MasterPersistence.class.getName());

			ReferenceRegistry.registerReference(Sms_MasterUtil.class,
				"_persistence");
		}

		return _persistence;
	}

	/**
	 * @deprecated
	 */
	public void setPersistence(Sms_MasterPersistence persistence) {
	}

	private static Sms_MasterPersistence _persistence;
}